package edu.um.variable;

import java.util.HashMap;
import java.util.Map;


public class VariableMap {
  Map<String, Object> variables = new HashMap<String, Object>();

  public void put(String name, VariableType type) {
    if (variables.containsKey(name)) {
      throw new IllegalArgumentException("The variable " + name
          + "is already defined");
    }
    variables.put(name, type);
  }

  public void put(String name, VariableMap variableMap) {
    variables.put(name, variableMap);
  }

  public Object get(String name) {
    return variables.get(name);
  }
}
